package tec.stan.ling.intro;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class LingPerspective implements IPerspectiveFactory {

	public static final String ID = "tec.stan.ling.perspective";

	private static final String TREEVIEW_ID = "tec.stan.ling.topo.tree";

	public void createInitialLayout(IPageLayout layout) {
		IFolderLayout leftTopfolder = layout.createFolder(
				"navigatorLayout", IPageLayout.LEFT, 0.3f, //$NON-NLS-1$
				IPageLayout.ID_EDITOR_AREA);
		leftTopfolder.addView(TREEVIEW_ID);
		layout.getViewLayout(TREEVIEW_ID).setCloseable(false);
		layout.getViewLayout(TREEVIEW_ID).setMoveable(false);

		leftTopfolder.addView(IPageLayout.ID_RES_NAV);
		layout.getViewLayout(IPageLayout.ID_RES_NAV).setCloseable(false);
		layout.getViewLayout(IPageLayout.ID_RES_NAV).setMoveable(false);

		IFolderLayout bottomFolder = layout
				.createFolder(
						"propertisLayout", IPageLayout.BOTTOM, 0.7f, IPageLayout.ID_EDITOR_AREA);//$NON-NLS-1$

		bottomFolder.addView(IPageLayout.ID_PROP_SHEET);
		layout.getViewLayout(IPageLayout.ID_PROP_SHEET).setCloseable(false);
		layout.getViewLayout(IPageLayout.ID_PROP_SHEET).setMoveable(false);

		bottomFolder.addView(IPageLayout.ID_PROGRESS_VIEW);
		layout.getViewLayout(IPageLayout.ID_PROGRESS_VIEW).setCloseable(false);
		layout.getViewLayout(IPageLayout.ID_PROGRESS_VIEW).setMoveable(false);
	}
}
